package com.wuliu.system.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.wuliu.system.mapper.SysAppletRoleMenuMapper;
import com.wuliu.system.domain.SysAppletRoleMenu;
import com.wuliu.system.service.ISysAppletRoleMenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 前端角色和菜单关联Service业务层处理
 * 
 * @author realue
 * @date 2023-10-22
 */
@Service
public class SysAppletRoleMenuServiceImpl extends ServiceImpl<SysAppletRoleMenuMapper, SysAppletRoleMenu> implements ISysAppletRoleMenuService
{
    @Resource
    private SysAppletRoleMenuMapper sysAppletRoleMenuMapper;

    /**
     * 查询前端角色和菜单关联
     * 
     * @param roleId 前端角色和菜单关联主键
     * @return 前端角色和菜单关联
     */
    @Override
    public SysAppletRoleMenu selectSysAppletRoleMenuByRoleId(Long roleId)
    {
        return sysAppletRoleMenuMapper.selectSysAppletRoleMenuByRoleId(roleId);
    }

    /**
     * 查询前端角色和菜单关联列表
     * 
     * @param sysAppletRoleMenu 前端角色和菜单关联
     * @return 前端角色和菜单关联
     */
    @Override
    public List<SysAppletRoleMenu> selectSysAppletRoleMenuList(SysAppletRoleMenu sysAppletRoleMenu)
    {
        return sysAppletRoleMenuMapper.selectSysAppletRoleMenuList(sysAppletRoleMenu);
    }

    /**
     * 新增前端角色和菜单关联
     * 
     * @param sysAppletRoleMenu 前端角色和菜单关联
     * @return 结果
     */
    @Override
    public int insertSysAppletRoleMenu(SysAppletRoleMenu sysAppletRoleMenu)
    {
        return sysAppletRoleMenuMapper.insertSysAppletRoleMenu(sysAppletRoleMenu);
    }

    /**
     * 修改前端角色和菜单关联
     * 
     * @param sysAppletRoleMenu 前端角色和菜单关联
     * @return 结果
     */
    @Override
    public int updateSysAppletRoleMenu(SysAppletRoleMenu sysAppletRoleMenu)
    {
        return sysAppletRoleMenuMapper.updateSysAppletRoleMenu(sysAppletRoleMenu);
    }

    /**
     * 批量删除前端角色和菜单关联
     * 
     * @param roleIds 需要删除的前端角色和菜单关联主键
     * @return 结果
     */
    @Override
    public int deleteSysAppletRoleMenuByRoleIds(Long[] roleIds)
    {
        return sysAppletRoleMenuMapper.deleteSysAppletRoleMenuByRoleIds(roleIds);
    }

    /**
     * 删除前端角色和菜单关联信息
     * 
     * @param roleId 前端角色和菜单关联主键
     * @return 结果
     */
    @Override
    public int deleteSysAppletRoleMenuByRoleId(Long roleId)
    {
        return sysAppletRoleMenuMapper.deleteSysAppletRoleMenuByRoleId(roleId);
    }
}
